﻿
//add friend by userid
function addfriend(fid) {
    //show popup layer to alert member ,system send invite message

    var popwin = $("#pop_window");

    popwin.css('display', 'block');
    $("#popback").css('display', 'block');
    


}


//set pop up windows position
function changeIt(objitem) {
    var myobj = objitem;
    var bodyhh = document.body.clientHeight;
    var bodyww = document.body.clientWidth;
    var objhh = myobj.clientHeight;
    var objww = myobj.clientWidth;
    alert(bodyhh);
    alert(bodyww);
    myobj.css('margin-top', (bodyhh - objhh) / 2);
    myobj.css('margin-left', (bodyww - objww) / 2)
    //myobj.style.top = (bodyhh - objhh) / 2;
   // myobj.style.left = (bodyww - objww) / 2;
}
